package ch6;

public class Pet1 {
    private String name, breed;
    private double weight;

    public Pet1(String name, String breed, double weight) {
        this.name = name;
        this.breed = breed;
        this.weight = weight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public void eat() {
        System.out.println("能吃");
    }

    public void sleep() {
        System.out.println("能睡");
    }
    public void introduce(){
        System.out.println("大家好，我的名字是："+this.name+",品种是："+
                this.breed+"。\n我的体重是："+this.weight+"公斤。");
    }
}
